package com.woniuxy.yogaapp;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

import org.springframework.web.socket.config.annotation.EnableWebSocket;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;

@SpringBootApplication
@MapperScan("com.woniuxy.yogaapp.mapper")
@EnableWebSocket
public class YogaappApplication {

	public static void main(String[] args) {
		SpringApplication.run(YogaappApplication.class, args);
	}
	@Bean //在容器中创建bean对象，在WebSocketUtil中需要用到的RemoteEndpoint对象
	public ServerEndpointExporter serverEndpointExporter() {
		return new ServerEndpointExporter();
	}
}
